//
//  UIButton+extension.swift
//  MySinaWeiBo
//
//  Created by zhangfuwei on 15/8/4.
//  Copyright © 2015年 zhangfuwei. All rights reserved.
//

import UIKit

extension UIButton {

    convenience init(title: String , titleColor:UIColor = UIColor.darkGrayColor(), imageName: String , fontSize: CGFloat = 12) {
     
        self.init()
        
        ///  设置颜色,文字,图片
        setTitle(title, forState: UIControlState.Normal)
        backgroundColor = UIColor.whiteColor()
        setTitleColor(titleColor, forState: UIControlState.Normal)
        setImage(UIImage(named: imageName), forState: UIControlState.Normal)
        titleLabel?.font = UIFont.systemFontOfSize(fontSize)
    
    
    }

}
